<?php
class frm_statistic{
	private $args;
	function __construct($arg){
		$this->args = $arg;
	}
	function getPublish(){
		if(!isset($this->args["r"])){
			$appid = DataGameManager::getAppID();
			{ $ptnmng  = new Util\str\PatternManager( $_SESSION[ "service_dir" ]  .'/../Application/' .FunctionApp::getAppDirectory(   $appid   ).'/' .'pattern/' . ('ptn_'.  'frm_statistic'  ) .'.php'  );} ;
			$ptnmng->gamebutton->appid = $appid;
			$ptnmng->main->appid = $appid;
			$games = FunctionGameCenter::getAllGames();
			$id = 1;
			if(is_array($games)){
				foreach($games as $game){
					$ptnmng->gamebutton->gameid = $id;
					$ptnmng->gamebutton->title = $game->getName();
					$ptnmng->gamebutton->description = $game->getInfomation();
					$ptnmng->main->gamelist .=  $ptnmng->gamebutton ->publish() ;
					$id++;
				}
			}
			return  $ptnmng->main ->publish() ;
		}else{
			if($request == "user"){
			}else if($request == "game"){
			}
		}
	}
}
?>